package com.skyblue.worklog.action;

import java.util.Date;

import com.opensymphony.xwork2.ActionSupport;
import com.skyblue.worklog.domain.WorkLog;
import com.skyblue.worklog.service.WorkLogService;

public class AddWorkLog extends ActionSupport{
	private WorkLogService workLogService;
	public WorkLogService getWorkLogService() {
		return workLogService;
	}

	public void setWorkLogService(WorkLogService workLogService) {
		this.workLogService = workLogService;
	}

	private Date logTime;
	private String logContent;

	public Date getLogTime() {
		return logTime;
	}

	public void setLogTime(Date logTime) {
		this.logTime = logTime;
	}

	public String getLogContent() {
		return logContent;
	}

	public void setLogContent(String logContent) {
		this.logContent = logContent;
	}
	
	public String execute()  {
		System.out.println("�����־");
		WorkLog workLog =new WorkLog();
		workLog.setLogContent(logContent);
		workLog.setLogTime(logTime);
		workLogService.addWorkLog(workLog);
		return SUCCESS;
	}
	
}
